﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BLL
{
    public class ForecastPost
    {
        private static Data.ForecastPost Data_Newscont = new Data.ForecastPost();
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static long Add(Model.ForecastPost model)
        {
            return Data_Newscont.Add(model);
        }
        public static Model.ForecastPost NewsTopOne(string sql)
        {
            return Data_Newscont.GetModelBysql(sql);
        }
        public static Model.ForecastPost GetModelByuser_id(long id)
        {
            return Data_Newscont.GetModelByuser_id(id);
        }

        /// <summary>
        /// 单条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public static Model.ForecastPost GetModel(long Id)
        {
            return Data_Newscont.GetModel(Id);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public static bool Delete(long Id)
        {
            return Data_Newscont.Delete(Id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static int Update(Model.ForecastPost model)
        {
            return Data_Newscont.Update(model);
        }
        // <summary>
        /// 抽取分页数据
        /// </summary>
        public static List<Model.ForecastPost> GetPageListBysql(int pageIndex, int pageSize, string sql, out int totalCount)
        {
            return Data_Newscont.GetPageListWhere(pageIndex, pageSize, sql, out totalCount);
        }
    }
}
